<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>自定义搜索</title>
    <script>
        function myck(url){
            document.getElementById("ifr").setAttribute("src",url);
        }
    </script>
</head>
<body>
<input type="button" value="百度" onclick="myck('https://www.baidu.com')">
<input type="button" value="搜狗" onclick="myck('https://www.sogou.com')">
<input type="button" value="360" onclick="myck('https://www.so.com')">
<iframe id="ifr" style="width: 100%;height: 500px;" src="https://www.baidu.com"></iframe>
</body>
</html>